﻿//_______________________________________________________________________________________________________________________
// Copy Right (c) 2010, 2011 SapiensIT Consulting GmbH, all rights reserved
//_______________________________________________________________________________________________________________________
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
// NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//_______________________________________________________________________________________________________________________
// PROJECT:     sapiens.at.SharePoint (SharePoint 2010/V4)
//_______________________________________________________________________________________________________________________
// VERSION:     2.0
//_______________________________________________________________________________________________________________________
// DESCRIPTION: 
//_______________________________________________________________________________________________________________________
// LICENSE:     Different licens Types apply to different file types:
//               - Source code files are governed by the MICROSOFT PUBLIC LICENSE (Ms-PL)
//               - Binary files are governed by MSDN CODE GALLERY BINARY LICENSE
//               - Documentation files are governed by CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE
//
//               The licenses can be found at the projects source location.
//               If you do not agree, don't use it!
// 
//_______________________________________________________________________________________________________________________
// Start SharePoint Branding, visit http://www.cliggin.com! Visit us on http://www.sapiens.at! Tell your friends! 
//_______________________________________________________________________________________________________________________
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sapiens.at.SharePoint.Mail.ICalendar
{
    /// <summary>
    /// Represents an Attendee in an ICalendar Meeting Request
    /// </summary>
    public class Attendee:CalendarComponent
    {
        /// <summary>
        /// Instantiates a new Attendee
        /// </summary>
        public Attendee() : base() { }
        /// <summary>
        /// Instantiates a new Attendee
        /// </summary>
        /// <param name="MailTo">E-Mail Address</param>
        /// <param name="Name">Name</param>
        public Attendee(string MailTo, string Name)
            :base()
        {
            EMail = MailTo;
            CN = Name;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="attendeeString">Attendeestring used in the ICalendar format</param>
        #region Properties
        /// <summary>
        /// Common name 
        /// </summary>
        [CalendarKeyWordAttribute("CN")]
        public string CN
        {
            get;
            set;
        }
        private string _EMail = string.Empty;
        /// <summary>
        /// E-Mail Address
        /// </summary>
        [CalendarKeyWordAttribute("MAILTO")]
        public string EMail
        {
            get { return _EMail; }
            set { _EMail = value.Replace(" ", "");}
        }
        /// <summary>
        /// Participation status
        /// </summary>
        [CalendarKeyWordAttribute("PARTSTAT")]
        public string ParticipationStatus
        {
            get;
            set;
        }
        /// <summary>
        /// Participation Role(Req, Opt, Non)
        /// </summary>
        [CalendarKeyWordAttribute("ROLE")]
        public string Role
        {
            get;
            set;
        }
        /// <summary>
        /// expectation of a reply
        /// </summary>
        [CalendarKeyWordAttribute("RSVP")]
        public string RSVP
        {
            get;
            set;
        }

        #endregion
    }
}
